import english from '../../../statics/img/english.svg'
import cn from '../../../statics/img/cn.svg'
import Australia from '../../../statics/img/Australia.svg'
import Belgium from '../../../statics/img/Belgium.svg'
import Estonia from '../../../statics/img/Estonia.svg'
import franch from '../../../statics/img/franch.svg'
import german from '../../../statics/img/german.svg'
import Latvian from '../../../statics/img/Latvian.svg'
import Netherlands from '../../../statics/img/Netherlands.svg'
import sweden from '../../../statics/img/sweden.svg'
import none from '../../../statics/img/none.svg'
import USA from '../../../statics/img/usa.svg'
import Egypt from '../../../statics/img/Egypt.svg'
import Japan from '../../../statics/img/japan.svg'


export function country_img(country){
    switch (country) {
        case '中国':
        case '香港':
        case '澳门':
        case '台湾':
        case '中国香港':
        case '中国台湾':
            return cn
        case '日本':return Japan
        case '法国':return franch
        case '美国':return USA
        case '荷兰':return Netherlands
        case '德国':return german
        case '爱沙尼亚':return Estonia
        case '拉脱维亚':return Latvian
        case '瑞典':return sweden
        case '澳大利亚':return Australia
        case '比利时':return Belgium
        case '英国':return english
        case 'Egypt':return Egypt
        default: return none
            
    }
}

export const limit_title = (title)=>{
   
    let  res=""
    let i = 0
    if(title&&title.length>15){
        while(res.length<15) res+=title[i++]
        res +="..."
    }
    return res
}